package com.cbh.feign.controller.product;



import java.util.List;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.cbh.api.model.ApiResult;
import com.cbh.api.model.product.PromotionPlan;


public interface SalesPromotionControllerBase {

	/**
	 * 保存
	 * 
	 * @param accountToken
	 * @param ob
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/sales/promotion", method = RequestMethod.POST, produces = "application/json")
	public ApiResult<String> save(@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestBody(required = true) PromotionPlan ob);

	/**
	 * 根据ID获取供应商
	 * 
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/sales/promotion/id", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<PromotionPlan> get(@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "id", required = true) String id);

	/**
	 * 获取供应商下促销信息
	 * 
	 * @param accountToken
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/sales/promotion/supplier", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<List<PromotionPlan>> list(
			@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "id", required = true) String id);

	/**
	 * 根据保险公司 代理公司 保费金额 获取促销信息
	 * 
	 * @param insurance
	 * @param institution
	 * @param amount
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/sales/promotion/exc/ic/ac", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<PromotionPlan> excIcAc(@RequestParam(value = "insurance", required = true) String insurance,
			@RequestParam(value = "institution", required = true) String institution,
			@RequestParam(value = "amount", required = true) String amount);

	/**
	 * 根据报价接口获取促销信息
	 * 
	 * @param offerInterface
	 * @param amount
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/sales/promotion/exc/oi", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<PromotionPlan> excOi(
			@RequestParam(value = "offerInterface", required = true) String offerInterface,
			@RequestParam(value = "amount", required = true) String amount);

}
